package edu.kit.aifb.ldstream.learner.tasks.mod;

import org.openrdf.repository.RepositoryConnection;
import org.openrdf.repository.RepositoryException;

import edu.kit.aifb.ldstream.env.Environment;

public abstract class LearnerTask implements Runnable {

	protected RepositoryConnection con;
	
	protected void startup(){
		try {
			this.con = Environment.REPO.getConnection();
			this.con.setAutoCommit(false);
		} catch (RepositoryException e) {
			e.printStackTrace();
		}
	}
	
	protected void shutdown(){
		try {
			this.con.close();
		} catch (RepositoryException e) {
			e.printStackTrace();
		}
	}
	
	public abstract void run();

}
